#include <iostream>
#include <cstdio>
using namespace std;

typedef long long ll;
ll ksm(int a, int b)
{
    ll ans = 1, base = a;
    while (b != 0)
    {
        if ((b & 1) != 0)
            ans *= base;
        base *= base;
        b >>= 1;
    }
    return ans;
}
int main()
{
    ll a, b, ans;
    cin >> a >> b;
    ans = ksm(a, b);
    cout << ans;
}